package com.kanas.webak.organization.view;

import java.util.Calendar;
import java.util.Date;
import java.util.UUID;

public class Event {
	private String id;
	private String summary;
	private Date begin;
	private Date end;
	private String type;
	private String source; 
	
	
	public Event(String summary, Date begin, Date end, String type ,String source) {
		Calendar calendar = Calendar.getInstance();
		this.id = UUID.randomUUID().toString().replaceAll("-", "");
		this.summary = summary;
		calendar.setTime(begin);
		calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)+8);
		this.begin = calendar.getTime();
		calendar.set(Calendar.HOUR_OF_DAY,calendar.get(Calendar.HOUR_OF_DAY)+10);
		this.end = calendar.getTime();
		this.type = type;
		this.source = source;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public Date getBegin() {
		return begin;
	}

	public void setBegin(Date begin) {
		this.begin = begin;
	}

	public Date getEnd() {
		return end;
	}

	public void setEnd(Date end) {
		this.end = end;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}
	
}
